﻿using System;
using System.Windows.Forms;

namespace CatUtils.Utils.SpecialUtils.SystemLock
{
    public partial class SystemLockForm : Form
    {
        public SystemLockForm()
        {
            InitializeComponent();
        }

        private bool CloseFlag = true;

        private void button1_Click(object sender, EventArgs e)
        {
            if (SystemLockLocal.VerificationKey(textBox1.Text.Trim()))
            {
                CloseFlag = false;
                Close();
            }
        }

        private void SystemLockForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (CloseFlag)
                System.Environment.Exit(0);
        }
    }
}